#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
void FindNum(int arr[], int sz, int* n1, int* n2)
{
	int t = 0;
	for (int i = 0; i < sz; i++)
	{
		t ^= arr[i];
	}
	int k = 0;
	for (int i = 0; i < 32; i++)
	{
		if (((t >> i) & 1 )!= 0)
		{
			k = i;
			break;
		}
	}
	*n1 = *n2 = 0;
	for (int i = 0; i < sz; i++)
	{
		if (((arr[i] >> k) & 1) != 0)
		{
			*n1 ^= arr[i];
		}
		else
		{
			*n2 ^= arr[i];
		}
	}
}
int main()
{
	int arr[] = { 1,2,3,4,5,1,2,3,4,6 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	int n1 = 0;
	int n2 = 0;
	FindNum(arr, sz, &n1, &n2);
	printf("%d %d", n1, n2);
	return 0;
}